<%--
  Created by IntelliJ IDEA.
  User: lhr
  Date: 2022/6/15
  Time: 17:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
      function checkAll(){
        var inputs = document.getElementsByTagName("input");

        for (var i = 0 ; i < inputs.length ; i++){
          inputs[i].checked = true;
        }
      }
    </script>
  </head>
  <body>
  兴趣爱好：
  <input type="checkbox" value="cpp" checked="checked">C++
  <input type="checkbox" value="Java">Java
  <input type="checkbox" value="js">JavaScript
  <br/>
  <button onclick="checkAll()">全选</button>
  </body>
</html>
